Add script to get OSTree-1.0.gir from libostree source build
authorFelix Krull <f_krull@gmx.de>
Sun, 26 Jul 2020 19:14:25 +0000 (21:14 +0200)
committerColin Walters <walters@verbum.org>
Fri, 6 May 2022 16:53:56 +0000 (12:53 -0400)
rust-bindings/rust/Dockerfile [new file with mode: 0644]
rust-bindings/rust/Makefile

diff --git a/rust-bindings/rust/Dockerfile b/rust-bindings/rust/Dockerfile
new file mode 100644 (file)
index 0000000..3b0b295
--- /dev/null
@@ -0,0 +1,20 @@
+ARG FEDORA_VER
+FROM fedora:${FEDORA_VER}
+
+RUN dnf install -y curl gcc make tar xz 'dnf-command(builddep)'
+RUN dnf builddep -y ostree
+
+ARG OSTREE_VER
+ENV OSTREE_SRC=https://github.com/ostreedev/ostree/releases/download/v${OSTREE_VER}/libostree-${OSTREE_VER}.tar.xz
+RUN mkdir /src && \
+    cd /src && \
+    curl -L -o /ostree.tar.xz ${OSTREE_SRC} && \
+    tar -xa --strip-components=1 -f /ostree.tar.xz && \
+    rm -r /ostree.tar.xz
+RUN mkdir /build && \
+    cd /build && \
+    /src/configure \
+        --with-openssl \
+        --with-curl \
+        && \
+    make -j4
index c34ec28f3d5f954b3c17688a4c1fd02c1a336741..1b4f67f9f5def56682520423565af1898a29a05b 100644 (file)
@@ -47,10 +47,13 @@ gir-files:
        curl -o $@ -L https://github.com/gtk-rs/gir-files/raw/master/${@F}
 
 gir-files/OSTree-1.0.gir:
+       podman build \
+               --build-arg FEDORA_VER=32 \
+               --build-arg OSTREE_VER=2020.4 \
+               -t ostree-build \
+               .
        podman run \
                --rm \
                -v $(PWD)/gir-files:/gir-files \
-               fedora:rawhide \
-               bash -eu -c "\
-                       dnf install -y ostree-devel && \
-                       cp /usr/share/gir-1.0/OSTree-1.0.gir /gir-files/"
+               ostree-build \
+               bash -eu -c "cp /build/OSTree-1.0.gir /gir-files/"